Dynomotion

Group: DynoMotion Message: 10248 From: ricochetproducts Date: 10/6/2014
Subject: G code Error

I have been experiencing G code errors.  When I run a program and a M3 comes up sometimes I get a G code error,  The spindle stops or won't start and the code stops. I have to start the spindle via the on screen button and press Run and the code runs from that point forward until it encounter another M3, It does not do it every time.   Any suggestions?


Thanks

Group: DynoMotion Message: 10250 From: Tom Kerekes Date: 10/6/2014
Subject: Re: G code Error
Hi,

What application are you running?  Mach3 or KMotionCNC?  How is M3 configured?  How does your Spindle Operate?  What Versions?

Regards
TK


Group: DynoMotion Message: 10251 From: ricochetproducts Date: 10/6/2014
Subject: Re: G code Error
Hi Tom,
I have not seen this problem before:

Software:  Kmotion 4.33C
Spindle Control is VFD  
M3 (CW) Set Bit 153 (direction),  Set Bit 52 (control panel indicator),  DAC 5 (S)

This is the code for manual mode: (this has always worked fine)

// SPINDLE CW
if  (Debounce(ReadBit(1040),&cwcount,&cwlast,&cwlastsolid) == 1)
{
if (ReadBit(153))
{
ClearBit(153);
ClearBit(154);
ClearBit(52);
}
else
{
SetBit(153);
SetBit(52);
}
}
// SPINDLE CCW
if  (Debounce(ReadBit(1041),&ccwcount,&ccwlast,&ccwlastsolid) == 1)
{
if (ReadBit(153))
{
ClearBit(153);
ClearBit(154);
ClearBit(53);
}
else
{
SetBit(153);
SetBit(154);
SetBit(53);
}
}
// SPINDLE STOP
if  (Debounce(ReadBit(1042),&sscount,&sslast,&sslastsolid) == 1)
{
if (ReadBit(153))
{
ClearBit(153);
ClearBit(154);
ClearBit(53);
ClearBit(52);
}

Group: DynoMotion Message: 10252 From: Rjreese29 Date: 10/6/2014
Subject: Re: G code Error
Tom,
I reported a similiar issue some time ago. Much of my issue was a user(me ) issue not knowing c. That is still much of my issue:)

When I run code, the m3 & m4 was ignored. Sometimes it would work, but couldn't see a trend.

On the user buttons for cw & CCw, I would have to press them 2x to get them to work. Off button works with a 1x press.
I am using the css files. In order for me to overcome this, I modified my c files( for cw & ccw).  What I did (as a work around), was copy and paste the function in the code (duplicated the code), but put a delay in between. This effectively duplicated what I was doing on the screen with the user buttons by having to press the m3/m4 buttons 2x.
By having the c function duplicated 2x within each respective c code, m3 & m4 now run properly while reading gcode.

I still didn't find a root cause, but did find a work around that I am happy with in seeing this inconsistency in m3/m4.

Rob

On Oct 6, 2014, at 5:49 AM, steveklemp@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

I have been experiencing G code errors.  When I run a program and a M3 comes up sometimes I get a G code error,  The spindle stops or won't start and the code stops. I have to start the spindle via the on screen button and press Run and the code runs from that point forward until it encounter another M3, It does not do it every time.   Any suggestions?


Thanks